#ifndef REGISTERDIALOG_H
#define REGISTERDIALOG_H

#include <QDialog>
#include "ui_RegisterDialog.h"
#include "AuthClient.h"
#include "EmailSender.h"

class RegisterDialog : public QDialog
{
    Q_OBJECT
public:
    explicit RegisterDialog(AuthClient *authClient, EmailSender *emailSender, QWidget *parent = nullptr);

private slots:
    void onGetCodeClicked();
    void onRegisterClicked();
    void onCodeSent(bool success);
    void onRegisterResult(bool success, const QString &message);
    void onEmailSendSuccess();
    void onEmailSendFailed(const QString &error);

private:
    Ui::RegisterDialog *ui;
    AuthClient *m_authClient;
    EmailSender *m_emailSender;
    QString m_email;
};

#endif // REGISTERDIALOG_H
